Collections of downhole tools and other devices are sometimes assembled into a string and attached to, for example, drill pipe or a wireline for insertion into a borehole. It can be useful, although challenging, to automatically determine the order of those downhole tools and other devices before or after they have been inserted into the borehole.